package com.blog.admin.vo;

import com.blog.util.DateUtils;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 *  留言
 */
@Data
public class BlogMessageVO {

    public String id;
    public String fromPkUser;
    public String toPkUser;
    public String content;
    public String replyMessage;
    public Date createTime;
    public Date updateTime;
    // 额外显示的自定义字段
    public String toName;
    public String toId;
    public String toHeadimg;
    public String fromName;
    public String fromId;
    public String fromHeadimg;
    public String formatCreateTime;
    public List<BlogMessageVO> reply;
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
        // 时间格式处理
        formatCreateTime  = DateUtils.getStringTime(createTime,DateUtils.datetime_sdf);
    }
}
